﻿<!DOCTYPE html>
<html lang="zh" class="no-js">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport"
		content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" />
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<title>产品中心</title>
	<meta name="description" content="Description...">
	<meta name="keywords" content="keyword1,keyword2,keyword3..">
	<link href="css/bootstrap.min.css" rel="stylesheet">
	<link href="fonts/FontAwesome/font-awesome.css" rel="stylesheet">
	<link href="css/animate.css" rel="stylesheet">
	<link href="css/bootsnav.css" rel="stylesheet">
	<link href="plugin/swiper3/css/swiper.min.css" rel="stylesheet">
	<link href="css/style.css" rel="stylesheet">
	<script src="js/jquery-1.10.1.js"></script>
	<script src="js/prefixfree.min.js"></script>
	<script src="js/bootstrap.min.js"></script>
	<script src="js/bootsnav.js"></script>
	<script src="plugin/swiper3/js/swiper.min.js"></script>
	<script src="plugin/swiper3/js/swiper.animate1.0.2.min.js"></script>
	<!-- <script src="js/public.js"></script> -->
	<script src="js/wow.min.js"></script>
	<script src="js/jquery.mixitup.js"></script>
	<script>
		var wow = new WOW({
			boxClass: 'wow',
			animateClass: 'animated',
			offset: 0,
			mobile: false,
			live: true
		});
		wow.init();
		$(function () {
			$("#portfolio").mixItUp();

		})
	</script>
	<!--[if lt IE 9]>
	  <script src="js/html5shiv.min.js"></script>
	  <script src="js/respond.min.js"></script>
	<![endif]-->
	<script>
		function scro() {
			if ($(document).scrollTop() > 50) {
				$(".headerBg").addClass("active");
			} else {
				$(".headerBg").removeClass("active");
			}
		}
		scro();
		$(window).scroll(function () {
			scro();
		})
	</script>
	<style>
		[v-cloak] {
			display: none;
		}
	</style>
</head>

<body>
	<div id="app" v-cloak>
		<!-- 头部 start -->
		<header class="headerBg fixed-top">
			<div class="container-fluid">
				<div class="logo"><a href="#"><img :src="companyInfo.logoUrl" class="img-responsive" alt=""
							width="100%"></a></div>
				<div class="menuBtn">
					<span></span>
					<span></span>
					<span></span>
				</div>
				<div class="hdRig clearfix">
					<div class="header_phone">
						<div class="icon_phone pt5 fl"><img src="images/icon_phone.png"></div>
						<div class="phone fl">
							<h4>服务咨询热线：</h4>
							<h2>{{companyInfo.phone}}</h2>
						</div>
					</div>
				</div>
				<div class="clear"></div>
				<div class="navBox hidden-xs hidden-sm">
					<ul class="navList list-unstyled">
						<li class="navLi">
							<h3><a href="index.html"><span>首页</span></a></h3>
						</li>
						<!-- <li class="navLi">
			<h3><a href="javascript:void(0)"><span>解决方案</span></a></h3>
		  </li> -->
						<li class="navLi">
							<h3><a href="Product-services.html" class="nav-active"><span>产品中心</span></a></h3>
							<div class="navSub">
								<ul class="navSubList list-unstyled">
									<li v-for="item in productCategory" :key="item.id" class="navSubLi">
										<h4><a :href="`Product-services.html?id=${item.id}`">{{item.productName}}</a>
										</h4>
									</li>
								</ul>
							</div>
						</li>
						<!-- <li class="navLi">
			<h3><a href="Cases.html"><span>客户案例</span></a></h3>
		  </li> -->
						<!-- <li class="navLi">
			<h3><a href="javascript:void(0)"><span>关于我们</span></a></h3>
			<div class="navSub">
			  <ul class="navSubList list-unstyled">
				<li class="navSubLi">
				  <h4><a href="onepage.html">公司简介</a></h4>
				</li>
				<li class="navSubLi">
				  <h4><a href="contact.html">联系方式</a></h4>
				</li>
				<li class="navSubLi">
				  <h4><a href="culture.html">企业文化</a></h4>
				</li>
				<li class="navSubLi">
				  <h4><a href="course.html">企业历程</a></h4>
				</li>
				<li class="navSubLi">
				  <h4><a href="news.html">新闻动态</a></h4>
				</li>
				<li class="navSubLi">
				  <h4><a href="Recruitment.html">人才招聘</a></h4>
				</li>
			  </ul>
			</div>
		  </li> -->
						<li class="navLi">
							<h3><a href="onepage.html"><span>关于我们</span></a></h3>
						</li>
						<li class="navLi">
							<h3><a href="contact.html"><span>联系我们</span></a></h3>
						</li>
						<!-- <li class="navLi">
			<h3><a href="Cooperation.html"><span>合作伙伴</span></a></h3>
		  </li> -->
						<li class="navLi language">
							<a href="Product-services.html">
								<span class="active">中文
								</span></a>
							&nbsp;&nbsp;/&nbsp;&nbsp;
							<a href="Product-services_en.html">
								<span>
									English
								</span>
							</a>
						</li>
					</ul>
				</div>
				<div class="navBoxm"></div>
			</div>
		</header>
		<!-- 头部 end -->
		<div class="content-wrap"></div>
		<div class="clearfix"></div>
		<div class="bannerN">
			<div class="imgFull"><img src="http://www.ztsy-plastics.com/images/ny1.jpg" class="img-responsive"></div>
			<p>
				<!-- 产品中心 -->
				<h2 class="banH2 wow fadeInUp"></h2>
			</p>
			<!-- <p><h4 class="banH4 wow fadeInUp">Product Center</h4></p> -->
		</div>
		<div class="mainBg box1Bg">
			<div class="container">
				<p style="margin-top: 16px;">
					<el-input clearable style="width: 100%;" placeholder="请输入产品名称" @change="change" v-model="inputValue">
						<i slot="prefix" class="el-input__icon el-icon-search"></i>
					</el-input>
				</p>
				<div class="category_list">
					<a :href="`Product-services.html?id=${item.id}`" v-for="item in productCategory" :key="item.id"
						class="category_item"
						:class="item.id == productId ? 'category_item_active' :''">{{item.productName}}</a>
				</div>
				<div class="products_list row">
					<div v-for="item in productList.records" :key="item.id"
						class="left_products_info clearfix mb20 wow fadeInUp"
						style="display: flex;flex-wrap: wrap; align-items: center;">
						<div class="products_bg"><a :href="`detailed.html?id=${item.id}`">
								<div class="products_img"><img :src="item.productDetailUrl" width="100%"></div>
							</a></div>
						<div class="products_content">
							<div>
								<h3><a :href="`detailed.html?id=${item.id}`"
										style="color: black;font-weight: bold;">{{item.productDetailName}}</a>
								</h3>
								<div>{{item.productDetailIntroduce}}</div>
							</div>
							<div style="width: 30px;height: 3px;background: #000;margin-top: 15px;"></div>
							<p class="text-overflow-3" style="word-break: break-all;">
								{{item.productDetail}}
							</p>
							<a :href="`detailed.html?id=${item.id}`" class="more">详情<i class="fa fa-arrow-right"
									style="margin-left: 10px;"></i></a>
						</div>
					</div>
				</div>
			</div>
		</div>
		<footer class="footerBg">
			<div class="container">
				<div class="footTop">
					<div class="footTopR text-right">
						<div class="clear">咨询服务电话：</div>
						<p class="fTel">{{companyInfo.phone}}</p>
						<!-- <p>（周一至周五8:30-17:30）</p> -->
					</div>
					<div class="footTopL">
						<ul class="footLink list-unstyled">
							<li>
								<h3><a class="ellipsis" href="index.html">首页</a></h3>
							</li>
							<li>
								<h3><a class="ellipsis" href="Product-services.html">产品中心</a></h3>
								<div class="footSub">
									<div class="footSub-item" v-for="item in productCategory.slice(0,5)" :key="item.id">
										<a class="ellipsis"
											:href="`Product-services.html?id=${item.id}`">{{item.productName}}
										</a>
									</div>
									<div v-if="productCategory.length > 5" class="footSub-item">
										<a class="ellipsis" :href="`Product-services.html`" style="color:#ff0000">MORE
										</a>
									</div>
								</div>
							</li>
							<li>
								<h3><a class="ellipsis" href="onepage.html">关于我们</a></h3>
							</li>
							<li>
								<h3><a class="ellipsis" href="contact.html">联系我们</a></h3>
							</li>
						</ul>
					</div>
					<div class="clear"></div>
				</div>

			</div>
			<div class="footBot">
				<p>Copyright © 2024 {{companyInfo.companyName}} </p>
				<div class="clear"></div>
			</div>
		</footer>
	</div>


</body>

</html>
<script src="js/config.js"></script>
<script src="js/axios.min.js"></script>
<script src="js/vue.min.js"></script>
<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@floating-ui/core@1.6.0"></script>
<script src="https://cdn.jsdelivr.net/npm/@floating-ui/dom@1.6.3"></script>
<script>
	new Vue({
		el: '#app',
		data() {
			return {
				companyInfo: {},
				productCategory: [],
				productList: [],
				productId: '',
				inputValue: ''
			}
		},
		methods: {
			change() {
				this.getProductList()
			},
			// 公司基本信息
			async getCompanyBasicData() {
				const res = await axios.get(basicUrl +
					'/company/companyInformation/detail?zhCn=1') // 调用API接口获取用户列表
				this.companyInfo = res.data.data
				console.log(this.companyInfo);
			},
			// 产品分类
			async getProductCategory() {
				const res = await axios.get(basicUrl +
					'/company/companyProduct/list?zhCn=1')
				this.productCategory = res.data.data
				console.log(this.productCategory);
				// 创建 script 标签
				var script = document.createElement('script');
				// 设置 script 标签的 src 属性为要引入的脚本路径
				script.src = './js/public.js';
				// 获取 head 元素
				var head = document.getElementsByTagName('head')[0];
				// 在 head 中添加 script 标签
				head.appendChild(script);
			},
			// 产品列表
			async getProductList() {
				const res = await axios.post(basicUrl +
					'/company/companyProductDetail/listByPage', {
						"pageSize": 999,
						"pageNum": 1,
						"productId": this.productId,
						zhCn: 1,
						productDetailName: this.inputValue
					})
				this.productList = res.data.data
				console.log(this.productList);
			},
		},
		async mounted() {
			const urlParams = new URLSearchParams(window.location.search);
			const id = urlParams.get('id');
			this.productId = id
			await this.getCompanyBasicData()
			this.getProductCategory()
			this.getProductList()
		}
	});
</script>
<style>
	@media screen and (max-width: 600px) {
		.products_bg {
			width: 100% !important;
		}

		.products_img {
			width: 100% !important;
		}

		.products_img img {
			width: 94% !important;
		}

		.left_products_info {
			width: 100%;
			visibility: visible !important;
		}

		.products_content {
			width: 100% !important;
		}
	}

	.category_list {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		margin: 16px 0;
	}

	.category_item {
		display: inline-block;
		vertical-align: top;
		font-size: 16px;
		color: #333;
		border: 1px solid #eee;
		/* min-width: 140px; */
		text-align: center;
		line-height: 46px;
		padding: 0 16px;
		margin: 0 12px 10px 0;
		transition: all 0s;
		border-radius: 6px;
		cursor: pointer;
	}

	.category_item:hover {
		background-color: #ff0000;
		color: #fff;
		border-color: #ff0000;
	}

	.category_item_active {
		background-color: #ff0000;
		color: #fff;
		border-color: #ff0000;
	}
</style>